package testcase;

/**
 * @author: zhang.rongqing
 * @since: 2019/10/31
 */
public class PassValueTest {

    public static void fillCup(Person person) {
        person.setName("qc");
        person.setAddress("shanghai");
    }

    public static void main(String[] args) {
        Person person = new Person("zrq", "shanghai");
        PassValueTest.fillCup(person);
        System.out.println("person name :" + person.getName());
    }
}

class Person {
    String name;
    String address;

    public Person(String name, String address) {
        this.name = name;
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
